<include file="Public:header" />
<link href="__PUBLIC__/Catalog/css/myFabu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="{:U('Membership/index')}?uid={$uid}" id="back"> < </a>我的发布
         </div>
   </div>
   <div class="products">
       <foreach name="productsList" item="vo" >
	       <div class="products_list">
	           <table>
	                <tr bordercolor="#FF0000">
	                    <td style="width:80px; height:70px;"><a href="{:U('Mproducts/detail')}?uid={$uid}&pid={$vo.products_id}"><img src="__PUBLIC__/images/products/thumb/s_{$vo.products_image}" /></a></td>
	                    <td style="width:190px; height:70px; padding-left: 5px;">
	                        <dl class="dls">
	                           <dt><a href="{:U('Mproducts/detail')}?uid={$uid}&pid={$vo.products_id}" style="font-size:18px; color:#000;">{$vo.products_name}</a></dt>
	                           <dd>
	                               <span class="phone"><foreach name="$vo['cate']" item="vo1">{$vo1.categories_name}</foreach></span>
	                               <span class="phone"><if condition="$vo.up_flag eq 1">已置顶</if></span>
	                               <span class="phone"><if condition="$vo.jiaji_flag eq 1">已加急</if></span>
	                           </dd>
	                           <dd><if condition="$vo.show_flag eq 1"><span class="what">已卖出</span><else/><if condition="$vo.products_status eq 1"><span class="what">已发布</span><else/><span class="what" style="color:red">未发布</span> </if><span class="time">{$vo['products_date_added'] | date='Y-m-d',###}</span></if></dd>
	                        </dl>
	                    </td>
	                    <td style="width:70px; height:70px;">
	                           <p class="cc">
	                               <if condition="$vo.show_flag eq 0"><a href="javascript:closeProduct('{$vo.products_id}');" class="ji">关闭</a></if>
	                           </p>
	                    </td>
	                </tr>
	           </table>
	       </div>
       </foreach>
       
   </div>
   <div class="products" style="text-align:center;margin-top:10px;"><a style="display:block;width:200px;height:40px;line-height:40px;margin:auto;text-align:center;background:#ccc;" href="{:U('Mproducts/publish')}?uid={$uid}">发布商品</a></div>
</div>
<div class="foot" style="display:none;" id="foot">
    <div class="foot2">
        <span class="foot2i">请选择操作</span>
        <a class="foot2x" onclick="javascript:$('#foot').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
        <span class="go" onclick="javascript:window.location.href='{:U("Mproducts/publish")}?uid={$uid}'">继续发布</span>
        <span class="del" style="display:none;">删除发布</span>
    </div>
</div>
<div class="foot" style="display:none;" id="closereason">
    <div class="foot2">
        <span class="foot2i">请选择操作</span>
        <a class="foot2x" onclick="javascript:$('#closereason').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
        <a class="go" id="havenshow" href=="">已经卖出</a>
        <a class="del" id="noshow"  href="">不想卖了</a>
    </div>
</div>
<script>
    $(function(){
        if('{$msg}'!='0'){
            alert('{$msg}');
        }
    });
    //关闭愿意
    function closeProduct(pid){
    	var href='{:U("Mproducts/delete")}?uid={$uid}&pid='+pid;
    	$('#havenshow').attr('href',href+'&reason=1'); 
    	$('#havenshow').attr('href',href+'&reason=2'); 
    	$('#closereason').css('display','block');
    }
</script>
<include file="Public:footer" />